package studio.raptor.databus.graph.domain;

import java.util.ArrayList;
import java.util.List;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 事件节点信息
 *
 * @author jack
 * @since 1.0
 */
public class Event {

  @NotEmpty(message = "the interface name must be non-null")
  private String name;

  @NotEmpty(message = "the interface code must be non-null")
  private String code;

  @NotEmpty(message = "the event id must be non-null")
  private String eventId;

  private Integer areaId;

  private Long orderId;

  private Long prodId;

  private Long partyId;

  private List<Long> accountId = new ArrayList<>();

  private List<Long> offerProdId = new ArrayList<>();

  private List<Long> offer = new ArrayList<>();

  @NotEmpty(message = "the orderTypeId must be non-null or empty")
  private String orderTypeId;

  @NotEmpty(message = "the event status must be non-null or empty")
  private String status;

  public Event() {
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getCode() {
    return code;
  }

  public void setCode(String code) {
    this.code = code;
  }

  public String getEventId() {
    return eventId;
  }

  public void setEventId(String eventId) {
    this.eventId = eventId;
  }

  public Long getProdId() {
    return prodId;
  }

  public void setProdId(Long prodId) {
    this.prodId = prodId;
  }

  public Long getPartyId() {
    return partyId;
  }

  public void setPartyId(Long partyId) {
    this.partyId = partyId;
  }

  public List<Long> getAccountId() {
    return accountId;
  }

  public void setAccountId(List<Long> accountId) {
    this.accountId = accountId;
  }

  public List<Long> getOfferProdId() {
    return offerProdId;
  }

  public void setOfferProdId(List<Long> offerProdId) {
    this.offerProdId = offerProdId;
  }

  public List<Long> getOffer() {
    return offer;
  }

  public void setOffer(List<Long> offer) {
    this.offer = offer;
  }

  public String getOrderTypeId() {
    return orderTypeId;
  }

  public void setOrderTypeId(String orderTypeId) {
    this.orderTypeId = orderTypeId;
  }

  public String getStatus() {
    return status;
  }

  public void setStatus(String status) {
    this.status = status;
  }

  public Integer getAreaId() {
    return areaId;
  }

  public void setAreaId(Integer areaId) {
    this.areaId = areaId;
  }

  public void addAccountId(Long accountId) {
    this.accountId.add(accountId);
  }

  public void addOfferProdId(Long offerProdId) {
    this.offerProdId.add(offerProdId);
  }

  public void addOffer(Long offer) {
    this.offer.add(offer);
  }

  public Long getOrderId() {
    return orderId;
  }

  public void setOrderId(Long orderId) {
    this.orderId = orderId;
  }


  @Override
  public String toString() {
    return "Event{" +
        "name='" + name + '\'' +
        ", code='" + code + '\'' +
        ", eventId='" + eventId + '\'' +
        ", areaId=" + areaId +
        ", orderId=" + orderId +
        ", prodId=" + prodId +
        ", partyId=" + partyId +
        ", accountId=" + accountId +
        ", offerProdId=" + offerProdId +
        ", offer=" + offer +
        ", orderTypeId='" + orderTypeId + '\'' +
        ", status='" + status + '\'' +
        '}';
  }
}
